#! /bin/bash
# 说明：在服务器集群执行命令
# by: jiwei
hosts=(
  "datacube-30.test.local"
  "datacube-31.test.local"
  "datacube-32.test.local"
  "datacube-33.test.local"
  "datacube-34.test.local"
  "datacube-35.test.local"
  "datacube-36.test.local"
  "datacube-37.test.local"
)

for host in "${hosts[@]}"
do
        echo "---------- $host ----------"
        ssh $host "$*"
done
